class array
{
	public static void main(String[] args)
	{
		
		int[] n={1,2,3,4,5,6,7,8,9,10};
		for(int i=0;i<n.length;i++)
		{
			System.out.println(n[i]);
	
		}
			System.out.println("sum of arry="+sumarray(n));
	}
	public static int sumarray(int[] n)
	{
		int c=0;
		for(int j=0;j<n.length;j++)
		{
			
			c=c+n[j];
		
		}
		return c;
	}	
}